package com.basic.common.result;

/**
 * @explain
 * @since  2017/11/3 14:56
 * @author
 */
public class ApiResult {

    public Boolean isSuccess = true;

    public WebResult webResult;

    public Boolean getSuccess() {
        return isSuccess;
    }

    public void setSuccess(Boolean success) {
        isSuccess = success;
    }

    public WebResult getWebResult() {
        return webResult;
    }

    public void setWebResult(WebResult webResult) {
        this.webResult = webResult;
    }

    public static ApiResult fail(WebResult webResult) {
        ApiResult apiResult = new ApiResult();
        apiResult.setSuccess(false);
        apiResult.setWebResult(webResult);
        return apiResult;
    }

    public static ApiResult success() {
        return new ApiResult();
    }

}
